<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="author" content="挥手の骑士">
    
    
    
    
    
    
    <title>Vorze SA 蓝牙协议(Cyclone A10 SA， UFO SA) | 骑士の物语</title>
    <link href="https://yihuishou.gitee.io" rel="prefetch">

    <link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/aos.css">
<link rel="stylesheet" href="/css/style.css">
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/aos.js"></script>
    <script src="/js/highslide/highslide-full.min.js"></script>
    <link rel="stylesheet" href="/js/highslide/highslide.css">
    <style type="text/css">
        @media (max-width: 768px) {
            body {
                background-color: #f0f0f0;
                background: url('/imgs/xsbg.gif');
                background-attachment: fixed;
            }
        }
    </style>
    
    <!--<script type="text/javascript">
      if (document.images) {
        var avatar = new Image();
        avatar.src = '/imgs/avatar.jpg'
        var previews = 'picHD_1.png,picHD_2.png,picHD_3.png,picHD_4.png,picHD_5.png,picHD_6.png,picHD_7.png,picHD_8.png,picHD_9.png,picHD_10.png,picHD_11.png,picHD_12.png,picHD_13.png,picHD_14.png,picHD_15.png,picHD_16.png,picHD_17.png,picHD_18.png,picHD_19.png,picHD_20.png,picHD_21.png,picHD_22.png,picHD_23.png,picHD_24.png,picHD_25.png,picHD_26.png,picHD_27.png,picHD_28.png,picHD_29.png,picHD_30.png,picHD_31.png,picHD_32.png,picHD_33.png,picHD_34.png,picHD_35.png,picHD_36.png,picHD_37.png,picHD_38.png,picHD_39.png,picHD_40.png,picHD_41.png,picHD_42.png'.split(',')
        var previewsPreLoad = []
        for(var i = 0; i < length; i++) {
          previewsPreLoad.push(new Image())
          previewsPreLoad[previewsPreLoad.length - 1].src = '/imgs/preview' + previews[i]
        }
      }
    </script>-->
</head></html>
<body>
    <!-- 背景轮播图功能 -->
    <section class="hidden-xs">
    <ul class="cb-slideshow">
        <li><span>天若</span></li>
        <li><span>有情</span></li>
        <li><span>天亦老</span></li>
        <li><span>我为</span></li>
        <li><span>长者</span></li>
        <li><span>续一秒</span></li>
    </ul>
</section>
    <!-- 欧尼酱功能, 谁用谁知道 -->
    
    <header class="navbar navbar-inverse" id="gal-header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".bs-navbar-collapse"
                    aria-expanded="false">
                <span class="fa fa-lg fa-reorder"></span>
            </button>
            <a href="https://yihuishou.gitee.io">
                
                <style>
                    #gal-header .navbar-brand {
                        height: 54px;
                        line-height: 24px;
                        font-size: 28px;
                        opacity: 1;
                        background-color: rgba(0,0,0,0);
                        text-shadow: 0 0 5px #fff,0 0 10px #fff,0 0 15px #fff,0 0 20px #228DFF,0 0 35px #228DFF,0 0 40px #228DFF,0 0 50px #228DFF,0 0 75px #228DFF;
                    }
                </style>
                <!-- 这里使用文字(navbar_text or config.title) -->
                <div class="navbar-brand">骑士の物语</div>
                
            </a>
        </div>
        <div class="collapse navbar-collapse bs-navbar-collapse">
            <ul class="nav navbar-nav" id="menu-gal">
                
                
                <li class="">
                    <a href="/">
                        <i class="fa fa-home"></i>首页
                    </a>
                </li>
                
                
                
                <li class="">
                    <a href="/archives">
                        <i class="fa fa-archive"></i>归档
                    </a>
                </li>
                
                
            </ul>
        </div>
    </div>
</header>
    <div id="gal-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 gal-right" id="mainstay">
                    
<article class="article well article-body" id="article">
    <div class="breadcrumb">
        <i class="fa fa-home"></i>
        <a href="https://yihuishou.gitee.io">骑士の物语</a>
        >
        <span>Vorze SA 蓝牙协议(Cyclone A10 SA， UFO SA)</span>
    </div>
    <!-- 大型设备详细文章 -->
    <div class="hidden-xs">
        <div class="title-article">
            <h1>
                <a href="/2019/01/04/865424390/">Vorze SA 蓝牙协议(Cyclone A10 SA， UFO SA)</a>
            </h1>
        </div>
        <div class="tag-article">
            
            <span class="label label-gal">
                <i class="fa fa-tags"></i>
                
                <a href="/tags/随笔/">随笔</a>
                
            </span>
            
            <span class="label label-gal">
                <i class="fa fa-calendar"></i> 2019-01-04
            </span>
            
        </div>
    </div>
    <!-- 小型设备详细文章 -->
    <div class="visible-xs">
        <center>
            <div class="title-article">
                <h4>
                    <a href="/2019/01/04/865424390/">Vorze SA 蓝牙协议(Cyclone A10 SA， UFO SA)</a>
                </h4>
            </div>
            <p>
                <i class="fa fa-calendar"></i> 2019-01-04
            </p>
            <p>
                
                <i class="fa fa-tags"></i>
                
                <a href="/tags/随笔/">随笔</a>
                
                
                
            </p>
        </center>
    </div>
    <div class="content-article">
        <h3 id="Vorze-SA-Series-Cyclone-A10-SA，-UFO-SA"><a href="#Vorze-SA-Series-Cyclone-A10-SA，-UFO-SA" class="headerlink" title="Vorze SA Series (Cyclone A10 SA， UFO SA)"></a>Vorze SA Series (Cyclone A10 SA， UFO SA)</h3><h4 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h4><p>Vorze SA系列是Rends Vorze系列玩具的蓝牙(独立或SA)版本。</p>
<p>Vorze A10 SA 它由一个可拆卸的滚筒组成，可以容纳一系列不同纹理的内胆。</p>
<p>UFO SA 它有两个带有旋转元件的罩杯组成，可以连接不同纹理的刺激装置。</p>
<p>允许通过蓝牙来控制硬件的旋转方向和速度。</p>
<h4 id="设备识别"><a href="#设备识别" class="headerlink" title="设备识别"></a>设备识别</h4><p>由于设备共享类似的BLE GATT服务ID，因此可以使用其BLE设备名称进行识别。</p>
<ul>
<li><p>对于Cyclone SA，蓝牙名称是<code>CycSA</code></p>
</li>
<li><p>对于UFO SA，蓝牙名称是<code>UFOSA</code></p>
</li>
</ul>
<h4 id="蓝牙细节"><a href="#蓝牙细节" class="headerlink" title="蓝牙细节"></a>蓝牙细节</h4><p>Vorze玩具使用蓝牙LE与其他机器进行通信。</p>
<p>有效服务UUID</p>
<p><code>40ee1111-63ec-4b7f-8ce7-712efd55b90e</code></p>
<p>写数据特征UUID</p>
<p><code>40ee2222-63ec-4b7f-8ce7-712efd55b90e</code></p>
<p>其他两个具有读取属性的2个特征UUID，使用目的目前尚不清楚。</p>
<h4 id="USB无线发射器"><a href="#USB无线发射器" class="headerlink" title="USB无线发射器"></a>USB无线发射器</h4><p>Vorze玩具配有USB无线发射器，可以使BTLE连接来模拟Windows上的串行端口。</p>
<p>这使得玩具可以轻松地用在所有没有BTLE功能的操作系统上，例如Windows XP/7/8，OS X &lt;10.6或带有Bluez &lt;5.28的Linux。</p>
<p>与蓝牙2 SPP不同，串行端口设置似乎对此无线发射器非常重要。</p>
<p>串口通信需要以<strong>19200波特，8/N/1运行，无流量控制</strong>的方式来运行，任何其他波特率都会导致错误，并会导致机器需要重新上电。</p>
<h4 id="协议"><a href="#协议" class="headerlink" title="协议"></a>协议</h4><p>要与Vorze硬件通信，使用简单的单向协议。</p>
<p>每个数据包由以下格式的3个字节组成:</p>
<p><code>0x0X 0x01 0xZZ</code> 结构是 <code>设备ID 保留字节 方向和速度字节</code></p>
<p>蓝牙协议传输上面的三个字节的数组</p>
<ol>
<li>标识符字节</li>
</ol>
<p>在上面的例子中表示为0x0X的16进制字节为设备标识符。示例如下:</p>
<p><code>Cyclone SA:0x01</code></p>
<p><code>UFO SA:0x02</code></p>
<ol start="2">
<li>保留字节</li>
</ol>
<p>对于所有Vorze玩具，已经观察到保留字节总是为0x01。</p>
<p>该保留字节是为SA振动器所使用的，其他设备都会使用0x01。</p>
<ol start="3">
<li>方向和速度字节</li>
</ol>
<p>在上面的例子中表示为0xZZ的字节控制硬件的速度和方向。</p>
<p>方向由字节的首位指定。0表示顺时针转动，1表示逆时针转动。</p>
<p>速度由第3个字节的7个剩余位指定。0-100的速度变化范围，所有速度设置 &gt; 100的参数都将被机器忽略。</p>
<p>示例</p>
<p>要将A10 Cyclone 设备ID(字节0:0x01)设置为以50%速度顺时针旋转(字节3: (通过16进制位运算：<code>0x00 &lt;&lt; 7) | 0x32</code> 得到 0x32)，请使用以下命令:</p>
<p><code>0x01 0x01 0x32</code></p>
<p>要设置UFO SA 设备ID(字节0:0x02)以100%速度逆时针旋转(字节3:(通过16进制位运算：<code>0x01 &lt;&lt; 7) | 0x64</code> 得到 0xe4)，请使用以下命令:</p>
<p><code>0x02 0x01 0xe4</code></p>
<p>超过100的速度将被忽略，因此，如果在上一个命令之后发送了下面的命令</p>
<p><code>0x02 0x01 0xef</code></p>
<p>则玩具将以100%的速度继续旋转，该命令被忽略。</p>
<p>计算方法也可先直接进行位运算再转为16进制数据</p>
<p><code>1 &lt;&lt; 7) | 50</code> -&gt; 转16进制 -&gt; <code>0x32</code></p>
<h4 id="CSV控制文件说明"><a href="#CSV控制文件说明" class="headerlink" title="CSV控制文件说明"></a>CSV控制文件说明</h4><p><img src="CSV.jpg" alt></p>
<p>控制文件为CSV格式。</p>
<p>每行代表一个控制信息，每个字段用英文逗号分割，换行结束。</p>
<p>每行从左至右共三个字段。</p>
<p>第一个字段为音轨执行动作时间，单位为 0.1 秒 例如：第10秒 <code>100</code></p>
<p>在玩具收到未收到下一个音轨指示之前，玩具将循环执行上一个动作</p>
<p>第二个字段为玩具旋转方向，<code>1</code> 向左，<code>0</code> 向右 </p>
<p>第三个字段为玩具驱动力度，理论范围 <code>1</code> （关闭）- <code>100</code> （最大）</p>
<p><strong>对于SA设备来说，驱动力度小于45则驱动力过低</strong></p>
<p>蓝牙指令未收到前会持续执行上一条脚本，由于通信延迟，过短的脚本时间间隔可能会产生问题。</p>
<p>例如：</p>
<p>10 0 50<br>18 0 0<br>20 0 50</p>
<p>会被一直执行 10 0 50</p>
<p>过短的时间间隔似乎也会对驱动造成影响</p>
<p>例如：</p>
<p>10 0 50<br>15 0 0</p>
<p>则收到指令后不会转动</p>

    </div>
</article>


                </div>
                <aside class="col-md-4 gal-left" id="sidebar">
    <!-- 此为sidebar的搜索框, 非搜索结果页面 -->
<aside id="sidebar-search">
    <div class="search hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <form class="form-inline clearfix" id="search-form" method="get"
              action="/search/index.html">
            <input type="text" name="s" class="form-control" id="searchInput" placeholder="搜索文章~" autocomplete="off">
            <button class="btn btn-danger btn-gal" type="submit">
                <i class="fa fa-search"></i>
            </button>
        </form>
    </div>
</aside>
    <aside id="sidebar-author">
    <div class="panel panel-gal" data-aos="flip-right" data-aos-duration="3000">
        <div class="panel-heading" style="text-align: center">
            <i class="fa fa-quote-left"></i>
            挥手の骑士
            <i class="fa fa-quote-right"></i>
        </div>
        <div class="author-panel text-center">
            <img src="/imgs/avatar.jpg" width="140" height="140"
                 alt="个人头像" class="author-image">
            <p class="author-description"></p>
        </div>
    </div>
</aside>
    
    <!-- 要配置好leancloud才能开启此小工具 -->
    
    
    <aside id="sidebar-recent_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            近期文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/18/55226946/">agent v3.2.1 插件激活码</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/22/2412014068/">干掉 CMS 未来属于 ZGC</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/21/4075219928/">OpenJDK 和 OracleJDK 的抉择</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/20/368594680/">Flutter 音乐播放器开发之路（一）</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/15/3650854255/">XaaS 到底是什么？</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/15/4036766117/">让 Windows 10 开机自动登录</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/14/466733536/">给 Flutter 项目初始化构建提个速</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/12/4125727764/">JavaScript 中 Splice 函数与数组塌陷</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/12/1586694155/">在 Java 中缩写 Lambda 表达式</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/04/2276828982/">博客文章规范</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="sidebar-rand_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            随机文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/09/07/1615584056/">Java 配置类与 XML</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/09/28/3178181323/">Mybatis 分页插件备忘录</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/10/15/1193253562/">PL/SQL Developer 使用 Oracle 压缩备份</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/09/19/1177412043/">SpringBoot 读取配置文件中的信息</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/04/23/3383294709/">Undertow 配置参数</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/11/20/1481638674/">Vue 中的 this</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2019/01/14/1112713561/">倒车原理示意图</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/10/16/844506532/">制作文字的半透明渐变网点图案描边效果</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2018/01/02/209983386/">好用的 VsCode 插件</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2017/11/10/2230869343/">我喜欢的排序算法</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="gal-sets">
        <div class="panel panel-gal hidden-xs" data-aos="fade-up" data-aos-duration="2000">
            <ul class="nav nav-pills pills-gal">

                
                <li>
                    <a href="/2019/01/04/865424390/index.html#sidebar-tags" data-toggle="tab" id="tags-tab">热门标签</a>
                </li>
                
                
                <li>
                    <a href="/2019/01/04/865424390/index.html#sidebar-friend-links" data-toggle="tab" id="friend-links-tab">友情链接</a>
                </li>
                
                
                <li>
                    <a href="/2019/01/04/865424390/index.html#sidebar-links" data-toggle="tab" id="links-tab">个人链接</a>
                </li>
                
            </ul>
            <div class="tab-content">
                
                <div class="cloud-tags tab-pane nav bs-sidenav fade" id="sidebar-tags">
    
    <a href="/tags/SpringSecurity/" style="font-size: 19.25549362683159px;" class="tag-cloud-link">SpringSecurity</a>
    
    <a href="/tags/Xml/" style="font-size: 11.78860981406774px;" class="tag-cloud-link">Xml</a>
    
    <a href="/tags/随笔/" style="font-size: 18.84739582043467px;" class="tag-cloud-link">随笔</a>
    
    <a href="/tags/大前端/" style="font-size: 10.108962449842311px;" class="tag-cloud-link">大前端</a>
    
    <a href="/tags/Dart/" style="font-size: 9.093272489168875px;" class="tag-cloud-link">Dart</a>
    
    <a href="/tags/Flutter/" style="font-size: 12.339462857148268px;" class="tag-cloud-link">Flutter</a>
    
    <a href="/tags/Go/" style="font-size: 13.05375122663542px;" class="tag-cloud-link">Go</a>
    
    <a href="/tags/IDEA/" style="font-size: 8.725021892251068px;" class="tag-cloud-link">IDEA</a>
    
    <a href="/tags/Java/" style="font-size: 14.410606751580342px;" class="tag-cloud-link">Java</a>
    
    <a href="/tags/JavaScript/" style="font-size: 14.218373316046966px;" class="tag-cloud-link">JavaScript</a>
    
    <a href="/tags/Mysql/" style="font-size: 14.079716044573571px;" class="tag-cloud-link">Mysql</a>
    
    <a href="/tags/Oracle/" style="font-size: 9.419166241015276px;" class="tag-cloud-link">Oracle</a>
    
    <a href="/tags/Photoshop/" style="font-size: 19.508408187689213px;" class="tag-cloud-link">Photoshop</a>
    
    <a href="/tags/RPG-Maker-MV/" style="font-size: 8.208243755848475px;" class="tag-cloud-link">RPG Maker MV</a>
    
    <a href="/tags/Restful/" style="font-size: 14.882989483745165px;" class="tag-cloud-link">Restful</a>
    
    <a href="/tags/Redis/" style="font-size: 11.001573331767226px;" class="tag-cloud-link">Redis</a>
    
    <a href="/tags/SQL/" style="font-size: 11.794632685431486px;" class="tag-cloud-link">SQL</a>
    
    <a href="/tags/SpringBoot/" style="font-size: 9.292080943017266px;" class="tag-cloud-link">SpringBoot</a>
    
    <a href="/tags/Swagger/" style="font-size: 14.722568176898832px;" class="tag-cloud-link">Swagger</a>
    
    <a href="/tags/Windows/" style="font-size: 13.431865076195212px;" class="tag-cloud-link">Windows</a>
    
    <a href="/tags/Deepleanring/" style="font-size: 8.90090170335609px;" class="tag-cloud-link">Deepleanring</a>
    
    <a href="/tags/Vue/" style="font-size: 12.687932041603725px;" class="tag-cloud-link">Vue</a>
    
    <a href="/tags/Docker/" style="font-size: 9.270313390382615px;" class="tag-cloud-link">Docker</a>
    
    <a href="/tags/Hexo/" style="font-size: 12.291480268849432px;" class="tag-cloud-link">Hexo</a>
    
    <a href="/tags/VsCode/" style="font-size: 9.103293905689018px;" class="tag-cloud-link">VsCode</a>
    
    <a href="/tags/SpringCloud/" style="font-size: 18.049886135652898px;" class="tag-cloud-link">SpringCloud</a>
    
</div>
                
                
                <div class="friend-links tab-pane nav bs-sidenav fade" id="sidebar-friend-links">
    
    <li>
        <a href="http://noodlefighter.com" target="_blank">虾包</a>
    </li>
    
    <li>
        <a href="https://loli.la" target="_blank">超级叫了</a>
    </li>
    
    <li>
        <a href="https://konata9.github.io" target="_blank">吃土的小此方</a>
    </li>
    
</div>
                
                
                <div class="links tab-pane nav bs-sidenav fade" id="sidebar-links">
    
    <li>
        <a href="https://github.com/yihuishou" target="_blank">Github</a>
    </li>
    
    <li>
        <a href="https://gite.com/yihuishou" target="_blank">码云</a>
    </li>
    
    <li>
        <a href="https://www.zhihu.com/people/hei-yi-tian-shi-48" target="_blank">知乎</a>
    </li>
    
</div>
                
            </div>
        </div>
    </aside>
    
</aside>
            </div>
        </div>
    </div>
    <footer id="gal-footer">
    <div class="container">
        Copyright © 2018 挥手の骑士 Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.&nbsp;Theme by <a href="https://github.com/ZEROKISEKI" target="_blank">AONOSORA</a>
    </div>
</footer>

<!-- 回到顶端 -->
<div id="gal-gotop">
    <i class="fa fa-angle-up"></i>
</div>
</body>
<script src="/js/activate-power-mode.js"></script>
<script>

    // 配置highslide
	hs.graphicsDir = '/js/highslide/graphics/'
    hs.outlineType = "rounded-white";
    hs.dimmingOpacity = 0.8;
    hs.outlineWhileAnimating = true;
    hs.showCredits = false;
    hs.captionEval = "this.thumb.alt";
    hs.numberPosition = "caption";
    hs.align = "center";
    hs.transitions = ["expand", "crossfade"];
    hs.lang.number = '共%2张图, 当前是第%1张';
    hs.addSlideshow({
      interval: 5000,
      repeat: true,
      useControls: true,
      fixedControls: "fit",
      overlayOptions: {
        opacity: 0.75,
        position: "bottom center",
        hideOnMouseOut: true
      }
    })

    // 初始化aos
    AOS.init({
      duration: 1000,
      delay: 0,
      easing: 'ease-out-back'
    });

</script>
<script>
	POWERMODE.colorful = 'true';    // make power mode colorful
	POWERMODE.shake = 'true';       // turn off shake
	// TODO 这里根据具体情况修改
	document.body.addEventListener('input', POWERMODE);
</script>
<script>
    window.slideConfig = {
      prefix: '/imgs/slide/background',
      ext: 'jpg',
      maxCount: '6'
    }
</script>
<script src="/js/hs.js"></script>
<script src="/js/blog.js"></script>



</html>